﻿using System.Web;

namespace InhollandAir
{
    public class Cookie
    {
        public static readonly string SessionKey = "uid";
        public static readonly string SessionName = "name";
        public static readonly string SessionLoginKey = "loginKey";

        public static readonly int SessionLoginKeyLength = 1000;
        public static readonly int SessionLength = 20;

        public static HttpCookie UserSession()
        {
            return HttpContext.Current.Request.Cookies[SessionKey];
        }

        public static void ClearUserSession()
        {
            HttpContext.Current.Cache.Remove(UserSession()[SessionName]);
        }
    }
}